package com.googlecode.gunncs.mechanism;

import java.util.ArrayList;

/**
 * Generic robot base
 * 
 * @author ajc
 * 
 */
public class RobotBase implements IRobotBase {

	private final ArrayList<IWheel> lefts;
	private final ArrayList<IWheel> rights;

	/**
	 * 
	 */
	public RobotBase(ArrayList<IWheel> left, ArrayList<IWheel> right) {
		this.lefts = left;
		this.rights = right;
	}

	@Override
	public void drive(double left, double right) {
		for (IWheel leftWheel : lefts) {
			leftWheel.setVelocity(left);
		}

		for (IWheel rightWheels : rights) {
			rightWheels.setVelocity(right);
		}
	}

}
